<?php
define('S_ROOT', dirname(__FILE__).DIRECTORY_SEPARATOR);
include_once(S_ROOT.'class/aes.php');

$apiList = array();

//Other
$api['country'] = '~~';
$api['url'] = 'http://api.moment.am/api.php';
array_push($apiList, $api);

//CN
$api['country'] = '86';
$api['url'] = 'http://shike01.aliapp.com/api.php';
array_push($apiList, $api);

$api['country'] = '86';
$api['url'] = 'http://42.121.17.217/api.php';
array_push($apiList, $api);

$bucketList = array();
//Other
$bucket['bucket_id'] = 101;
$bucket['url'] = 'http://moment.s3.amazonaws.com/';
array_push($bucketList, $bucket);

//CN
$bucket['bucket_id'] = 8601;
$bucket['url'] = 'http://servicecn1-moment.stor.sinaapp.com/';
array_push($bucketList, $bucket);

/*
$bucket['bucket_id'] = 8602;
$bucket['url'] = 'http://moment.servicecn1.s3.sinaapp.com/';
array_push($bucketList, $bucket);
*/

$bucket['bucket_id'] = 8603;
$bucket['url'] = 'http://moment.oss.aliyuncs.com/';
array_push($bucketList, $bucket);

$nav['api'] = $apiList;
$nav['bucket'] = $bucketList;


$mtime = explode(' ', microtime());
$server_time = $mtime[1];
$local_time = $_GET["local_time"];
$nav['time_difference'] = (int)$server_time - (int)$local_time; 

$nav['sina_weibo_app_key'] = "3140957945";
$nav['sina_weibo_app_secret'] = "ffd04b48d8ebdb1f88e313eef6900810";
//$nav['sina_weibo_app_redirect_uri'] = "http://shike01.aliapp.com/sinaweibo.php";
$nav['sina_weibo_app_redirect_uri'] = "http://";

echo base64_encode(json_encode($nav));
?>